wpt_tmp->position.latitude.degrees = be_read32(&rec->latitude) / 10000000.0;
if (be_read16(&rec->year) != 0xff) {
- struct tm tm = {0};
-
+ struct tm tm;
+
+ memset (&tm, sizeof(tm), 0);
tm.tm_min = rec->min;
tm.tm_hour = rec->hour;
tm.tm_mday = rec->day;
wr_deinit,
data_read,
data_write,
- cetus_args
+ cetus_args,
};
* native format, convert them to Palm (big-endian) format, and write
* them to a ubyte string.
*
- * $Id: util.c,v 1.1 2002-08-16 06:13:10 robertl Exp $
+ * $Id: util.c,v 1.2 2003-07-28 22:59:01 robertl Exp $
*/
#include "config.h"
debug_dump(FILE *outfile, const char *prefix,
const ubyte *buf, const udword len)
{
- int lineoff;
+ unsigned int lineoff;
for (lineoff = 0; lineoff < len; lineoff += 16)
{
wr_deinit,
data_read,
data_write,
+ NULL
};
rw_deinit,
data_read,
data_write,
-
+ NULL
};
wr_deinit,
data_read,
data_write,
+ NULL
};
geo_wr_deinit,
geo_read,
geo_write,
+ NULL
};
wr_deinit,
data_read,
data_write,
+ NULL
};
wr_deinit,
data_read,
data_write,
+ NULL
};
for(pdb_rec = pdb->rec_index.rec; pdb_rec; pdb_rec=pdb_rec->next) {
waypoint *wpt_tmp;
char *vdata;
- struct tm tm = {0};
+ struct tm tm;
+ memset (&tm, sizeof(tm), 0);
wpt_tmp = xcalloc(sizeof(*wpt_tmp),1);
rec = (struct record *) pdb_rec->data;
wpt_tmp->position.altitude.altitude_meters = be_read32(&rec->elevation);
wr_deinit,
data_read,
data_write,
+ NULL
};
mapsend_wr_deinit,
mapsend_read,
mapsend_wpt_write,
+ NULL
};
psp_wr_deinit,
psp_read,
psp_write,
+ NULL
};
#define num_mappings (sizeof(mapping) / sizeof(struct qv_icon_mapping))
static geocache_type icon_to_wpt(int icon_bitmap) {
- int i;
+ unsigned int i;
for (i = 0; i < num_mappings; i++) {
if (icon_bitmap == mapping[i].bitmap_id) {
}
static int wpt_to_icon(geocache_type type) {
- int i;
+ unsigned int i;
for (i = 0; i < num_mappings; i++) {
if (type == mapping[i].gc_type) {
wr_deinit,
data_read,
data_write,
+ NULL
};
static int i_am_little_endian;
static int endianness_tested;
-static int waypt_out_count;
+static unsigned int waypt_out_count;
static void
test_endianness(void)
tpg_wr_deinit,
tpg_read,
tpg_write,
+ NULL
};
le_read64(void *dest, const void *src)
{
char *cdest = dest;
- char *csrc = src;
+ const char *csrc = src;
doswap(); /* make sure i_am_little_endian is initialized */